package com.mall.dubbo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mall.model.domain.UmsRole;
import org.apache.ibatis.annotations.Select;

/**
 * @author xyiaao
 * @description 针对表【ums_role(后台用户角色表)】的数据库操作Mapper
 * @createDate 2022-03-29 19:46:09
 * @Entity com.mall.model.domain.UmsRole
 */
public interface UmsRoleMapper extends BaseMapper<UmsRole> {

    @Select("select t1.id, t1.name from ums_role t1 join ums_admin_role_relation t2 on t2.admin_id = #{umsAdminId} and t1.id = t2.role_id")
    UmsRole findUmsRoleByUmsAdminId(Long umsAdminId);


}




